﻿using System.Collections.Generic;
using System.Text.Json.Serialization;
using Elsa.Server.Api.Endpoints.Activities;

namespace TyMES.Communication.Request
{
    public class UploadProductDataRequset : FactoryAPIBase.BaseRequest
    {
        [JsonPropertyName("data")]
        public List<InspectionData> Insights { get; set; }

        public UploadProductDataRequset(List<InspectionData> inspectionData)
        {
            Insights = inspectionData;
            ServiceId = "Quality001_inspectiondata";
        }

        public class InspectionData
        {
            [JsonPropertyName("factoryCode")] public string FactoryCode { get; set; }

            [JsonPropertyName("lineCode")] public string LineCode { get; set; }

            [JsonPropertyName("stationCode")] public string StationCode { get; set; }

            [JsonPropertyName("materialCode")] public string MaterialCode { get; set; }

            [JsonPropertyName("materialVersion")] public string MaterialVersion { get; set; }

            [JsonPropertyName("snNumber")] public string SnNumber { get; set; }

            [JsonPropertyName("operationCode")] public string OperationCode { get; set; }

            [JsonPropertyName("paramCode")] public string ParamCode { get; set; }

            [JsonPropertyName("paramName")] public string ParamName { get; set; }

            [JsonPropertyName("standardValue")] public string StandardValue { get; set; }

            [JsonPropertyName("paramRange1")] public string ParamRange1 { get; set; }

            [JsonPropertyName("paramRange2")] public string ParamRange2 { get; set; }

            [JsonPropertyName("realValue")] public string RealValue { get; set; }

            [JsonPropertyName("isQualified")] public string IsQualified { get; set; }

            [JsonPropertyName("checkStarttime")] public string CheckStarttime { get; set; }

            [JsonPropertyName("checkEndtime")] public string CheckEndtime { get; set; }

            [JsonPropertyName("dataStatus")] public string DataStatus { get; set; }

            [JsonPropertyName("addUserId")] public string AddUserId { get; set; }

            [JsonPropertyName("addTime")] public string AddTime { get; set; } 

            [JsonPropertyName("editUserId")] public string EditUserId { get; set; }

            [JsonPropertyName("editTime")] public string EditTime { get; set; } 

            [JsonPropertyName("spare1")] public string Spare1 { get; set; }

            [JsonPropertyName("spare2")] public string Spare2 { get; set; }

            [JsonPropertyName("spare3")] public string Spare3 { get; set; }

            [JsonPropertyName("spare4")] public string Spare4 { get; set; }

            [JsonPropertyName("addUserCode")] public string AddUserCode { get; set; }

            [JsonPropertyName("machineCode")] public string MachineCode { get; set; }
        }
    }
}
